#include<stdio.h>
#include<stdlib.h>
char* strcat(char* c1,char* c2){
    char* i=c1;
    int sum1=0,sum2=0;
    while(*i!='\0'){
        sum1++;
        i++;
    }
    i=c2;
    while(*i!='\0'){
        sum2++;
        i++;
    }
    char* c3=(char*)malloc(sizeof(char)*(sum1+sum2+1));
    i=c1;
    char *j=c3;
    while(*i!='\0'){
        *j=*i;
        i++;
        j++;
    }
    i=c2;
    while(*i!='\0'){
        *j=*i;
        i++;
        j++;
    }
    *j='\0';
    return c3;
}
int main(){
    char* c1="i am a ";
    char* c2="mango";
    char* c3=strcat(c1,c2);
    while(*c3!='\0'){
        printf("%c",*c3);
        c3++;
    }
    return 0;
}
